 <%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%> 
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>

<div  style="padding:16px; " align="center">
	

<table align="center" width="800" background="" border="0" cellspacing="0" cellpadding="0">
	<tr background="images/headtrain1.gif">
		<td height="150" width="200">
			<logic:present name="auth" scope="session">
	        	<h2><bean:message key="label.hello" />, ${auth.userName}</h2>
	       		<html:link href="adminConsol.do"><bean:message key="label.administrator" /></html:link>
	        </logic:present>
        
        <br/>
			<bean:message key="languages" />:<br/>
			
			<c:set var="localeCode" value="${sessionScope['org.apache.struts.action.LOCALE']}" scope="session" />
			<c:set var="availableLanguages" value="en,ru" />
			
			<c:forEach var="lang" items="${availableLanguages}">
		
			
			<c:if test="${lang == localeCode}">
				<html:link action="/locale.do?lang=${lang}"><b>${lang}</b></html:link> 
			</c:if>
			<c:if test="${!(lang == localeCode)}">
				<html:link action="/locale.do?lang=${lang}">${lang}</html:link>
			</c:if>
</c:forEach>
        
   		</td> 
	    <td align="center" valign="top" >
				<h3><a style="color: black;white; font-size:45px;"><bean:message key="label.book.ticket"/></a></h3>
		</td>
		<td align="right" width="200">
			<logic:notPresent name="auth" scope="session">
        		<h2><bean:message key="please.login"/></h2>
				<a href="login.jsp"><bean:message key="label.login"/></a>
			</logic:notPresent>
			
			<logic:present name="auth" scope="session">
        		<html:link href="logout.do"><bean:message key="label.exit"/></html:link>
 			</logic:present>
		</td>
	</tr>
</table>
        
        
    
</div>